import sys
import schedule
sys.path.append('..')

from douyin.mudi.dou_yin import *
from jingdong.mudi.jd import *
from pinduoduo.mudi.pdd_bill import *
from weidian.mudi.wd import *
from weimeng.mudi.wm import *
from xiaohongshu.mudi.xhs import *
from yz.mudi.youzan import *

def start():
    log_file = os.path.join(os.getcwd(), 'logs', f'{datetime.datetime.now().strftime("%Y-%m-%d")}.txt')
    if not os.path.exists(log_file):
        logger.add(log_file)
    host = "http://172.16.29.21:8989/"
    # host = "http://1.95.166.150:8997/"
    logger.info('开始获取任务')
    dy_main(host)
    jd_main(host)
    pdd_main(host)
    wd_main(host)
    wm_main(host)
    xhs_main(host)
    youzan_main(host)

def main():
    start()

main()